package com.es.action.heat.exec.execthread;

import com.es.action.heat.builder.HeatBuilder;
import com.es.action.heat.builder.ProcedureDirector;

import java.util.concurrent.Callable;

/**
 * @author Will
 */
public class ThreadCallable implements Callable {

    private String key;

    public ThreadCallable(String key) {
        this.key = key;
    }

    /**
     * 废弃，不需要多线程运行，直接运行 javac *.java形式
     *
     * @return
     * @throws Exception
     */
    @Override
    public Object call() throws Exception {
        // 执行编译s
        ProcedureDirector.autoRun(new HeatBuilder(key));
        return key;
    }
}
